/**
 * 会员套餐类型
 */
export type MembershipType = 'basic_monthly' | 'pro_monthly' | 'basic_yearly' | 'pro_yearly';

/**
 * 会员套餐
 */
export interface MembershipPlan {
  id: number;
  name: string;
  originalPrice: number;
  currentPrice: number;
  features: string[];
  type: MembershipType;
  tag?: string;  // 套餐标签，如"热门推荐"、"入门畅享"等
  isBest?: boolean;  // 是否为最佳选择
}

/**
 * 字数套餐
 */
export interface WordPlan {
  id: number;
  words: number;  // 字数
  originalPrice: number;
  currentPrice: number;
  mostUsed: boolean;  // 是否最常用
}

/**
 * 充值订单
 */
export interface RechargeOrder {
  orderId: string;
  expireTime: string;  // 二维码过期时间
  amount: number;  // 支付金额
  url: string; // 支付二维码URL
  status: 'unpaid' | 'paid' | 'cancelled';  // 订单状态
}

/**
 * 订单记录
 */
export interface RecentLog{
  userName: string,
  timeAgo: string,
  planName: string,
  amount: Number
}

export interface UserInfo{
  wordLeft: number,
  untilTime: string,
  membership: string
}

export interface RechargeRecord {
  id: number;
  orderNo: string;  // 订单号
  planName: string;  // 套餐名称
  amount: number;  // 支付金额
  paymentMethod: 'wechat' | 'alipay';  // 支付方式
  status: 'success' | 'failed' | 'pending';  // 支付状态
  createTime: string;  // 创建时间
} 